<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Aloha Editor</title>
  <meta name="description" content="The world's most advanced browser HTML5 based WYSIWYG editor lets you experience a whole new way of editing." />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link rel="stylesheet" href="css/api.css" />
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
  <script src="js/jquery-bbq.js"></script>
  <script src="js/api.js"></script>
  <script src="js/lib/modernizr-1.7.min.js"></script>
  <!--[if lt IE 9]>
  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
</head>

  <body id="docs">
<!-- ============================== header ================================= -->
    <!-- begin static/header.html -->
      <header role="banner">
    <div class="container">
      <h1 id="logo">
        <a href="http://aloha-editor.org"><img src="img/logo.png" alt="Aloha Editor" /></a>
        </h1>

      <nav role="navigation">
        <ul>
          <li><a href="http://aloha-editor.org/about.php">About</a></li>
          <li><a href="#">Guides</a></li>
          <li class="active"><a href="http://aloha-editor.org/api" >API Docs</a></li>
          <li><a href="http://getsatisfaction.com/aloha_editor">Forum</a></li>
        </ul>
      </nav>
    </div>
  </header>
  


    <!-- end static/header.html -->

<!-- ============================== classes index ============================ -->

    <section id="list">
      <header>
        <form action="#" role="search">
          <input type="text" />
          <a href="#" class="search-reset"></a>
        </form>
      </header>
      <div>
        <span class="odd active"><a href="/">API Documentation Index</a></span>
	
	<span class='even' global><a href="../symbols/_global_.html">_global_</a></span>
	
	<span class='odd'><a href="../symbols/Aloha.Editable.html">Aloha.Editable</a></span>
	
	<span class='even'><a href="../symbols/Aloha.Message.html">Aloha.Message</a></span>
	
	<span class='odd'><a href="../symbols/Aloha.RepositoryDocument.html">Aloha.RepositoryDocument</a></span>
	
	<span class='even'><a href="../symbols/Aloha.RepositoryFolder.html">Aloha.RepositoryFolder</a></span>
	
	<span class='odd'><a href="../symbols/Aloha.RepositoryManager.html">Aloha.RepositoryManager</a></span>
	
	<span class='even'><a href="../symbols/Aloha.ui.Button.html">Aloha.ui.Button</a></span>
	
	<span class='odd'><a href="../symbols/Aloha.ui.MultiSplitButton.html">Aloha.ui.MultiSplitButton</a></span>
	
	<span class='even'><a href="../symbols/Array.html">Array</a></span>
	
	<span class='odd'><a href="../symbols/block.html">block</a></span>
	
	<span class='even'><a href="../symbols/block.block.html">block.block</a></span>
	
	<span class='odd'><a href="../symbols/block.block.AbstractBlock.html">block.block.AbstractBlock</a></span>
	
	<span class='even'><a href="../symbols/block.block.DebugBlock.html">block.block.DebugBlock</a></span>
	
	<span class='odd'><a href="../symbols/block.block.DefaultBlock.html">block.block.DefaultBlock</a></span>
	
	<span class='even'><a href="../symbols/block.BlockContentHandler.html">block.BlockContentHandler</a></span>
	
	<span class='odd'><a href="../symbols/block.blockmanager.html">block.blockmanager</a></span>
	
	<span class='even'><a href="../symbols/block.editor.html">block.editor</a></span>
	
	<span class='odd'><a href="../symbols/block.editor.AbstractEditor.html">block.editor.AbstractEditor</a></span>
	
	<span class='even'><a href="../symbols/block.editor.AbstractFormElementEditor.html">block.editor.AbstractFormElementEditor</a></span>
	
	<span class='odd'><a href="../symbols/block.editor.EmailEditor.html">block.editor.EmailEditor</a></span>
	
	<span class='even'><a href="../symbols/block.editor.NumberEditor.html">block.editor.NumberEditor</a></span>
	
	<span class='odd'><a href="../symbols/block.editor.StringEditor.html">block.editor.StringEditor</a></span>
	
	<span class='even'><a href="../symbols/block.editor.UrlEditor.html">block.editor.UrlEditor</a></span>
	
	<span class='odd'><a href="../symbols/block.editormanager.html">block.editormanager</a></span>
	
	<span class='even'><a href="../symbols/block.sidebarattributeeditor.html">block.sidebarattributeeditor</a></span>
	
	<span class='odd'><a href="../symbols/Boolean.html">Boolean</a></span>
	
	<span class='even'><a href="../symbols/contenthandler.html">contenthandler</a></span>
	
	<span class='odd'><a href="../symbols/Date.html">Date</a></span>
	
	<span class='even'><a href="../symbols/diff_match_patch.html">diff_match_patch</a></span>
	
	<span class='odd'><a href="../symbols/Ext.html">Ext</a></span>
	
	<span class='even'><a href="../symbols/Ext.DomQuery.html">Ext.DomQuery</a></span>
	
	<span class='odd'><a href="../symbols/Ext.TaskMgr.html">Ext.TaskMgr</a></span>
	
	<span class='even'><a href="../symbols/Ext.util.TaskRunner.html">Ext.util.TaskRunner</a></span>
	
	<span class='odd'><a href="../symbols/Function.html">Function</a></span>
	
	<span class='even'><a href="../symbols/GENTICS.Utils.RangeObject.html">GENTICS.Utils.RangeObject</a></span>
	
	<span class='odd'><a href="../symbols/GENTICS.Utils.RangeTree.html">GENTICS.Utils.RangeTree</a></span>
	
	<span class='even'><a href="../symbols/jQuery.html">jQuery</a></span>
	
	<span class='odd'><a href="../symbols/jQuery.fn.html">jQuery.fn</a></span>
	
	<span class='even'><a href="../symbols/patch_obj.html">patch_obj</a></span>
	
	<span class='odd'><a href="../symbols/rangy-Module.html">rangy-Module</a></span>
	
	<span class='even'><a href="../symbols/String.html">String</a></span>
	
	<span class='odd'><a href="../symbols/Ui.AttributeField.html">Ui.AttributeField</a></span>
	

      </div>
    </section>
    <footer>
      <a href="https://github.com/alohaeditor/Aloha-Editor/issues" class="button secondary">REPORT AN ISSUE</a>
    </footer>

    <div role="main">
      <section id="documentation">
<!-- ============================== class title ============================ -->
        <h1 class="classTitle">
          
          Class: diff_match_patch
        </h1>

<!-- ============================== class summary ========================== -->
        <p class="description">
          <span class="extends">
          
          </span>

          

          
            <span class="definedin">Defined in: <a href="../symbols/src/_Users_rene_evo42_app_aloha_Aloha-Editor_src_plugins_common_undo_vendor_diff_match_patch_uncompressed.js.html">diff_match_patch_uncompressed.js</a>.</span>
          
        </p>


<!-- ============================== properties summary ===================== -->
      
      




<!-- ============================== methods summary ======================== -->
      
      
        
        
      
        
        
          <h2>Instance Methods</h2>
          <ul class="methods">
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_cleanupEfficiency">diff_cleanupEfficiency</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_cleanupMerge">diff_cleanupMerge</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_cleanupSemantic">diff_cleanupSemantic</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_cleanupSemanticLossless">diff_cleanupSemanticLossless</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_commonPrefix">diff_commonPrefix</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_commonSuffix">diff_commonSuffix</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_fromDelta">diff_fromDelta</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_levenshtein">diff_levenshtein</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_main">diff_main</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_prettyHtml">diff_prettyHtml</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_text1">diff_text1</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_text2">diff_text2</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_toDelta">diff_toDelta</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#diff_xIndex">diff_xIndex</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#match_main">match_main</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#patch_addPadding">patch_addPadding</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#patch_apply">patch_apply</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#patch_deepCopy">patch_deepCopy</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#patch_fromText">patch_fromText</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#patch_make">patch_make</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#patch_splitMax">patch_splitMax</a></li>
          
            <li class="fixedFont"><a href="../symbols/diff_match_patch.html#patch_toText">patch_toText</a></li>
          
          </ul>
        
      
<!-- ============================== events summary ======================== -->
      



<!-- ============================== field details ========================== -->
      


<!-- ============================== method details ========================= -->
      
        
        
      
        
        
          <h2>Instance Method Detail</h2>
          
            <a name="diff_cleanupEfficiency"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_cleanupEfficiency</span>
            </div>
            <div class="description">
              Reduce the number of edits by eliminating operationally trivial equalities.
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> <b>diffs</b>
                    
                  </dt>
                  <dd>Array of diff tuples.</dd>
                
                </dl>
              
              
              
              
              
              
              

          
            <a name="diff_cleanupMerge"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_cleanupMerge</span>
            </div>
            <div class="description">
              <p>Reorder and merge like edit sections.  Merge equalities.
Any edit section can move as long as it doesn't cross an equality.</p>
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> <b>diffs</b>
                    
                  </dt>
                  <dd>Array of diff tuples.</dd>
                
                </dl>
              
              
              
              
              
              
              

          
            <a name="diff_cleanupSemantic"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_cleanupSemantic</span>
            </div>
            <div class="description">
              Reduce the number of edits by eliminating semantically trivial equalities.
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> <b>diffs</b>
                    
                  </dt>
                  <dd>Array of diff tuples.</dd>
                
                </dl>
              
              
              
              
              
              
              

          
            <a name="diff_cleanupSemanticLossless"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_cleanupSemanticLossless</span>
            </div>
            <div class="description">
              <p>Look for single edits surrounded on both sides by equalities
which can be shifted sideways to align the edit to a word boundary.
e.g: The c<ins>at c</ins>ame. -> The <ins>cat </ins>came.</p>
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> <b>diffs</b>
                    
                  </dt>
                  <dd>Array of diff tuples.</dd>
                
                </dl>
              
              
              
              
              
              
              

          
            <a name="diff_commonPrefix"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_commonPrefix</span>
            </div>
            <div class="description">
              Determine the common prefix of two strings.
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>text1</b>
                    
                  </dt>
                  <dd>First string.</dd>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>text2</b>
                    
                  </dt>
                  <dd>Second string.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">number</span> <p>The number of characters common to the start of each
string.</p></dd>
                
                </dl>
              
              
              

          
            <a name="diff_commonSuffix"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_commonSuffix</span>
            </div>
            <div class="description">
              Determine the common suffix of two strings.
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>text1</b>
                    
                  </dt>
                  <dd>First string.</dd>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>text2</b>
                    
                  </dt>
                  <dd>Second string.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">number</span> The number of characters common to the end of each string.</dd>
                
                </dl>
              
              
              

          
            <a name="diff_fromDelta"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_fromDelta</span>
            </div>
            <div class="description">
              <p>Given the original text1, and an encoded string which describes the
operations required to transform text1 into text2, compute the full diff.</p>
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>text1</b>
                    
                  </dt>
                  <dd>Source string for the diff.</dd>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>delta</b>
                    
                  </dt>
                  <dd>Delta text.</dd>
                
                </dl>
              
              
              
              
                <dl class="detailList">
                <dt class="heading">Throws:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Error</span>  <b></b>
                  </dt>
                  <dd>If invalid input.</dd>
                
                </dl>
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> Array of diff tuples.</dd>
                
                </dl>
              
              
              

          
            <a name="diff_levenshtein"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_levenshtein</span>
            </div>
            <div class="description">
              <p>Compute the Levenshtein distance; the number of inserted, deleted or
substituted characters.</p>
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> <b>diffs</b>
                    
                  </dt>
                  <dd>Array of diff tuples.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">number</span> Number of changes.</dd>
                
                </dl>
              
              
              

          
            <a name="diff_main"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_main</span>
            </div>
            <div class="description">
              <p>Find the differences between two texts.  Simplifies the problem by stripping
any common prefix or suffix off the texts before diffing.</p>
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>text1</b>
                    
                  </dt>
                  <dd>Old string to be diffed.</dd>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>text2</b>
                    
                  </dt>
                  <dd>New string to be diffed.</dd>
                
                  <dt>
                    <span class="light fixedFont">boolean=</span> <b>opt_checklines</b>
                    
                  </dt>
                  <dd>Optional speedup flag. If present and false,
    then don't run a line-level diff first to identify the changed areas.
    Defaults to true, which does a faster, slightly less optimal diff.</dd>
                
                  <dt>
                    <span class="light fixedFont">number</span> <b>opt_deadline</b>
                    
                  </dt>
                  <dd>Optional time when the diff should be complete
    by.  Used internally for recursive calls.  Users should set DiffTimeout
    instead.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> Array of diff tuples.</dd>
                
                </dl>
              
              
              

          
            <a name="diff_prettyHtml"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_prettyHtml</span>
            </div>
            <div class="description">
              Convert a diff array into a pretty HTML report.
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> <b>diffs</b>
                    
                  </dt>
                  <dd>Array of diff tuples.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">string</span> HTML representation.</dd>
                
                </dl>
              
              
              

          
            <a name="diff_text1"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_text1</span>
            </div>
            <div class="description">
              Compute and return the source text (all equalities and deletions).
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> <b>diffs</b>
                    
                  </dt>
                  <dd>Array of diff tuples.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">string</span> Source text.</dd>
                
                </dl>
              
              
              

          
            <a name="diff_text2"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_text2</span>
            </div>
            <div class="description">
              Compute and return the destination text (all equalities and insertions).
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> <b>diffs</b>
                    
                  </dt>
                  <dd>Array of diff tuples.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">string</span> Destination text.</dd>
                
                </dl>
              
              
              

          
            <a name="diff_toDelta"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_toDelta</span>
            </div>
            <div class="description">
              <p>Crush the diff into an encoded string which describes the operations
required to transform text1 into text2.
<code class='syntax js'><span class="class">E</span>.<span class="variable">g</span>.</code> =3\t-2\t+ing  -> Keep 3 chars, delete 2 chars, insert 'ing'.
Operations are tab-separated.  Inserted text is escaped using %xx notation.</p>
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> <b>diffs</b>
                    
                  </dt>
                  <dd>Array of diff tuples.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">string</span> Delta text.</dd>
                
                </dl>
              
              
              

          
            <a name="diff_xIndex"> </a>
            <div class="fixedFont">
              <span class="methodname">diff_xIndex</span>
            </div>
            <div class="description">
              <p>loc is a location in text1, compute and return the equivalent location in
text2.
e.g. 'The cat' vs 'The big cat', 1->1, 5->8</p>
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!diff_match_patch.Diff></span> <b>diffs</b>
                    
                  </dt>
                  <dd>Array of diff tuples.</dd>
                
                  <dt>
                    <span class="light fixedFont">number</span> <b>loc</b>
                    
                  </dt>
                  <dd>Location within text1.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">number</span> Location within text2.</dd>
                
                </dl>
              
              
              

          
            <a name="match_main"> </a>
            <div class="fixedFont">
              <span class="methodname">match_main</span>
            </div>
            <div class="description">
              Locate the best instance of 'pattern' in 'text' near 'loc'.
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>text</b>
                    
                  </dt>
                  <dd>The text to search.</dd>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>pattern</b>
                    
                  </dt>
                  <dd>The pattern to search for.</dd>
                
                  <dt>
                    <span class="light fixedFont">number</span> <b>loc</b>
                    
                  </dt>
                  <dd>The location to search around.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">number</span> Best match index or -1.</dd>
                
                </dl>
              
              
              

          
            <a name="patch_addPadding"> </a>
            <div class="fixedFont">
              <span class="methodname">patch_addPadding</span>
            </div>
            <div class="description">
              <p>Add some padding on text start and end so that edges can match something.
Intended to be called only from within patch_apply.</p>
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!patch_obj></span> <b>patches</b>
                    
                  </dt>
                  <dd>Array of patch objects.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">string</span> The padding string added to each side.</dd>
                
                </dl>
              
              
              

          
            <a name="patch_apply"> </a>
            <div class="fixedFont">
              <span class="methodname">patch_apply</span>
            </div>
            <div class="description">
              <p>Merge a set of patches onto the text.  Return a patched text, as well
as a list of true/false values indicating which patches were applied.</p>
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!patch_obj></span> <b>patches</b>
                    
                  </dt>
                  <dd>Array of patch objects.</dd>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>text</b>
                    
                  </dt>
                  <dd>Old text.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">!Array.<string|!Array.<boolean>></span> <p>Two element Array, containing the
new text and an array of boolean values.</p></dd>
                
                </dl>
              
              
              

          
            <a name="patch_deepCopy"> </a>
            <div class="fixedFont">
              <span class="methodname">patch_deepCopy</span>
            </div>
            <div class="description">
              Given an array of patches, return another array that is identical.
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!patch_obj></span> <b>patches</b>
                    
                  </dt>
                  <dd>Array of patch objects.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">!Array.<!patch_obj></span> Array of patch objects.</dd>
                
                </dl>
              
              
              

          
            <a name="patch_fromText"> </a>
            <div class="fixedFont">
              <span class="methodname">patch_fromText</span>
            </div>
            <div class="description">
              Parse a textual representation of patches and return a list of patch objects.
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">string</span> <b>textline</b>
                    
                  </dt>
                  <dd>Text representation of patches.</dd>
                
                </dl>
              
              
              
              
                <dl class="detailList">
                <dt class="heading">Throws:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Error</span>  <b></b>
                  </dt>
                  <dd>If invalid input.</dd>
                
                </dl>
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">!Array.<!patch_obj></span> Array of patch objects.</dd>
                
                </dl>
              
              
              

          
            <a name="patch_make"> </a>
            <div class="fixedFont">
              <span class="methodname">patch_make</span>
            </div>
            <div class="description">
              <p>Compute a list of patches to turn text1 into text2.
Use diffs if provided, otherwise compute it ourselves.
There are four ways to call this function, depending on what data is
available to the caller:
Method 1:
a = text1, b = text2
Method 2:
a = diffs
Method 3 (optimal):
a = text1, b = diffs
Method 4 (deprecated, use method 3):
a = text1, b = text2, c = diffs</p>
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">string|!Array.<!diff_match_patch.Diff></span> <b>a</b>
                    
                  </dt>
                  <dd>text1 (methods 1,3,4) or
Array of diff tuples for text1 to text2 (method 2).</dd>
                
                  <dt>
                    <span class="light fixedFont">string|!Array.<!diff_match_patch.Diff></span> <b>opt_b</b>
                    
                  </dt>
                  <dd>text2 (methods 1,4) or
Array of diff tuples for text1 to text2 (method 3) or undefined (method 2).</dd>
                
                  <dt>
                    <span class="light fixedFont">string|!Array.<!diff_match_patch.Diff></span> <b>opt_c</b>
                    
                  </dt>
                  <dd>Array of diff tuples
for text1 to text2 (method 4) or undefined (methods 1,2,3).</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">!Array.<!patch_obj></span> Array of patch objects.</dd>
                
                </dl>
              
              
              

          
            <a name="patch_splitMax"> </a>
            <div class="fixedFont">
              <span class="methodname">patch_splitMax</span>
            </div>
            <div class="description">
              <p>Look through the patches and break up any which are longer than the maximum
limit of the match algorithm.
Intended to be called only from within patch_apply.</p>
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!patch_obj></span> <b>patches</b>
                    
                  </dt>
                  <dd>Array of patch objects.</dd>
                
                </dl>
              
              
              
              
              
              
              

          
            <a name="patch_toText"> </a>
            <div class="fixedFont">
              <span class="methodname">patch_toText</span>
            </div>
            <div class="description">
              Take a list of patches and return a textual representation.
              
              
            </div>

            

              
                <dl class="parameters">
                <dt class="heading">Parameters:</dt>
                
                  <dt>
                    <span class="light fixedFont">!Array.<!patch_obj></span> <b>patches</b>
                    
                  </dt>
                  <dd>Array of patch objects.</dd>
                
                </dl>
              
              
              
              
              
                <dl class="returns">
                <dt class="heading">Returns:</dt>
                
                  <dd><span class="light fixedFont">string</span> Text representation of patches.</dd>
                
                </dl>
              
              
              

          
        
      

<!-- ============================== event details ========================= -->
      



<!-- ============================== footer ================================= -->
        <div class="fineprint" style="clear:both">
          
          Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Nov 30 2011 13:33:45 GMT+0100 (CET)
        </div>
      </section>
    </div>
  </body>
</html>
